package org.jeecg.modules.charge.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.charge.entity.*;

import java.util.List;

/**
 * @Description: 票据入库
 * @Author: jeecg-boot
 * @Date:   2019-08-08
 * @Version: V1.0
 */
public interface IChargeInvoiceInhouseService extends IService<ChargeInvoiceInhouse> {

    /**
     * 是否已生成id
     * @param id
     * @return
     */
    public String selectId(String id);

    /**
     * 批量插入
     * @param chargeInvoiceInhouse
     * @return
     */
    public Integer saveba(ChargeInvoiceInhouse chargeInvoiceInhouse);

    /**
     * 查询票据本编号是否已经生成
     * @param chargeInvoiceInhouse
     * @return
     */
    public Integer getGroupIsExits(ChargeInvoiceInhouse chargeInvoiceInhouse);

    /**
     * 票据领用时修改票据状态
     * @param chargeInvoiceInhouse
     * @return
     */
    public void updateInHouse(ChargeInvoiceInhouse chargeInvoiceInhouse);

    /**
     * 根据当前的部门ID获取对应的领用部门和共享部门对应的领用部门
     * @param oid
     * @return
     */
    public List<String> getOfficeIdsByUid(String oid);

    /**
     * 根据对应的领用部门获取到领用的票据编号
     */
    public List<ChargeInvoiceTree> getInvoicesByOids(List<String> oids, String typeNum);

    /**
     * 对应部门CODE获取对应部门
     */
    public String  getOidByOcode(String orgCode);

    public  List<ChargeInvoiceType> selectTypeAll();

    public List<ChargeInvoiceInhouse> findInvoicePage(IPage<ChargeInvoiceInhouse> page,ChargeInvoiceInhouse chargeInvoiceInhouse);

    public List<ChargeInvoiceInhouse> findInvoiceList(ChargeInvoiceInhouse chargeInvoiceInhouse);

    public Integer CancellactionHouse(Cancellaction cancellaction);
}
